package com.isoft.demo01.dao;

import com.isoft.demo01.entity.GameType;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;

import java.util.List;

@Mapper
public interface GameTypeDao {
    @Insert("insert into tb_gametype(typename) values (#{typename})")
    public int insert(String typename);
    @Select("<script>"+ " select * from tb_gametype" +
            "        <if test=\"1!=isdel and isdel!=null\">" +
            "           and where isdel=0" +
            "        </if>"
            +"</script>")
    public List<GameType> getAll(Boolean isdel);
    @Update("update tb_gametype set isdel=#{isdel} where typeid=#{typeid}")
    public int updetadel(@Param("typeid") Integer typeid,@Param("isdel") Integer isdel);
    @Update("update tb_gametype set typename=#{typename} where typeid=#{typeid}")
    public int update(@Param("typeid") Integer id,@Param("typename") String typename);

}
